package com.his.struts.dao.tc;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.his.struts.form.QtichaForm;
import com.his.struts.form.tcform.Ticha_bw;
import com.his.struts.form.tcform.Tichajb;
import com.his.struts.form.tcform.Tichasysjc;
import com.his.struts.form.tcform.jc_gnForm;
import com.his.struts.form.tcform.jc_xcForm;
import com.his.struts.form.tcform.jc_zyForm;
import com.his.struts.form.tcform.jc_zzForm;
import com.his.struts.util.DbUtil;
/**
 * 体擦DAO
 * @author 刘焱
 *
 */
public class TcDaoImp implements TcDao {
	DbUtil db = new DbUtil();
	/**
	 * 删除方法
	 * @param uid ----->用户ID
	 * @return boolean
	 */
	public boolean del(int uid){
		boolean ok = false;
		List list = new ArrayList();
		list.add("jiancha_gn");
		list.add("jiancha_xcwt");
		list.add("jiancha_zy");
		list.add("jiancha_zz");
		list.add("tc_bw");
		list.add("tc_jb");
		list.add("tc_sysjc");
		for (int i = 0; i < list.size(); i++) {
			String sql = "delete from " + list.get(i) + " where uid = ?";
			ArrayList dellist = new ArrayList();
			dellist.add(uid);
			int o = db.executeUpdate(sql, dellist);
			if(o == 0){
				break;
			}
			ok = true;
		}
		return ok;
	}
	/**
	 * 添加方法
	 * @param qf --》QtichaForm
	 * @return boolean
	 */
	public boolean add(QtichaForm qf){
		int uid = qf.getUid();
		boolean ok = false;
		ArrayList tc_jblist = new ArrayList();
		String tc_jbsql = "insert into tc_jb (uid,tcBMI,tchuxi,tcmaibo,tcqinggan,tcrenzi,tcshengao,tcshenghuo,tctime,tctiwen,tctizhong" +
				",tczhusu,tcyiyuan,tcyisheng,tcxueya_z,tcyaowei,tcxueya_y) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
		Tichajb jb = qf.getJb();
		tc_jblist.add(uid);
		tc_jblist.add(jb.getTcBMI());
		tc_jblist.add(jb.getTchuxi());
		tc_jblist.add(jb.getTcmaibo());
		tc_jblist.add(jb.getTcqinggan());
		tc_jblist.add(jb.getTcrenzi());
		tc_jblist.add(jb.getTcshengao());
		tc_jblist.add(jb.getTcshenghuo());
		tc_jblist.add(jb.getTctime());
		tc_jblist.add(jb.getTctiwen());
		tc_jblist.add(jb.getTctizhong());
		tc_jblist.add(jb.getTczhusu());
		tc_jblist.add(jb.getTcyiyuan());
		tc_jblist.add(jb.getTcyisheng());
		tc_jblist.add(jb.getTcxueya_z());
		tc_jblist.add(jb.getTcyaowei());
		tc_jblist.add(jb.getTcxueya_y());
		
		ArrayList tc_sysjclist = new ArrayList();
		String tc_sysjcsql = "insert into tc_sysjc (uid,fcg_cl,fcg_fcg,fcg_yxsy_yang,fcg_yxsy_ying,ncg_bz,ncg_ndb,ncg_nt_ndhs,ncg_nt_ndy,ncg_nt_tt,ncg_PH" +
				",ncg_qt,ncg_wg,ncg_xb_gx,ncg_xb_jjt,ncg_xb_RBC,ncg_xb_spxb,ncg_xb_WBC,xt_ds,xt_zt,xcg_HB,xcg_WBC,xcg_RBC,xcg_PLT) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
		Tichasysjc sysjc = qf.getSysjc();
		tc_sysjclist.add(uid);
		tc_sysjclist.add(sysjc.getFcg_cl());
		tc_sysjclist.add(sysjc.getFcg_fcg());
		tc_sysjclist.add(sysjc.getFcg_yxsy_yang());
		tc_sysjclist.add(sysjc.getFcg_yxsy_ying());
		tc_sysjclist.add(sysjc.getNcg_bz());
		tc_sysjclist.add(sysjc.getNcg_ndb());
		tc_sysjclist.add(sysjc.getNcg_nt_ndhs());
		tc_sysjclist.add(sysjc.getNcg_nt_ndy());
		tc_sysjclist.add(sysjc.getNcg_nt_tt());
		tc_sysjclist.add(sysjc.getNcg_PH());
		tc_sysjclist.add(sysjc.getNcg_qt());
		tc_sysjclist.add(sysjc.getNcg_wg());
		tc_sysjclist.add(sysjc.getNcg_xb_gx());
		tc_sysjclist.add(sysjc.getNcg_xb_jjt());
		tc_sysjclist.add(sysjc.getNcg_xb_RBC());
		tc_sysjclist.add(sysjc.getNcg_xb_spxb());
		tc_sysjclist.add(sysjc.getNcg_xb_WBC());
		tc_sysjclist.add(sysjc.getXt_ds());
		tc_sysjclist.add(sysjc.getXt_zt());
		tc_sysjclist.add(sysjc.getXcg_HB());
		tc_sysjclist.add(sysjc.getXcg_WBC());
		tc_sysjclist.add(sysjc.getXcg_RBC());
		tc_sysjclist.add(sysjc.getXcg_PLT());
		
		ArrayList tc_bwlist = new ArrayList();
		String tc_bwsql = "insert into tc_bw (uid,bi_bd,bi_jg,bi_xj,er_tl,er_we,fb_cz,fb_gz,fb_kz_ss" +
				",fb_kz_yd,fb_pz,fb_sz,fb_tz,fk_fj,fk_gj,fk_qt,fk_wy,fk_yd,fk_yj,fk_zg,jzsl_y,jzsl_z" +
				",kq_cun,kq_nm,kq_qt,kq_yc,kq_yy,ph_gm,ph_jzx,ph_lbj,ph_rf,qt_syc,qt_yc,sejue,sl_y,sl_z,yd_xz_z" +
				",yd_xz_y,yd_xz_sc_y,yd_xz_sc_n,yd_sz,yd_qlx,yd_jz,yd_gn,yd_gm_qt,yd_gm_ct,yd_gm_bk,yan" +
				",xz_zy,xz_xlv,xz_xl,xb_xk,xb_ly,xb_hxy) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
		Ticha_bw bw = qf.getBw();
		tc_bwlist.add(uid);
		tc_bwlist.add(bw.getBi_bd());
		tc_bwlist.add(bw.getBi_jg());
		tc_bwlist.add(bw.getBi_xj());
		tc_bwlist.add(bw.getEr_tl());
		tc_bwlist.add(bw.getEr_we());
		tc_bwlist.add(bw.getFb_cz());
		tc_bwlist.add(bw.getFb_gz());
		tc_bwlist.add(bw.getFb_kz_ss());
		tc_bwlist.add(bw.getFb_kz_yd());
		tc_bwlist.add(bw.getFb_pz());
		tc_bwlist.add(bw.getFb_sz());
		tc_bwlist.add(bw.getFb_tz());
		tc_bwlist.add(bw.getFk_fj());
		tc_bwlist.add(bw.getFk_gj());
		tc_bwlist.add(bw.getFk_qt());
		tc_bwlist.add(bw.getFk_wy());
		tc_bwlist.add(bw.getFk_yd());
		tc_bwlist.add(bw.getFk_yj());
		tc_bwlist.add(bw.getFk_zg());
		tc_bwlist.add(bw.getJzsl_y());
		tc_bwlist.add(bw.getJzsl_z());
		tc_bwlist.add(bw.getKq_cun());
		tc_bwlist.add(bw.getKq_nm());
		tc_bwlist.add(bw.getKq_qt());
		tc_bwlist.add(bw.getKq_yc());
		tc_bwlist.add(bw.getKq_yy());
		tc_bwlist.add(bw.getPh_gm());
		tc_bwlist.add(bw.getPh_jzx());
		tc_bwlist.add(bw.getPh_lbj());
		tc_bwlist.add(bw.getPh_rf());
		tc_bwlist.add(bw.getQt_syc());
		tc_bwlist.add(bw.getQt_yc());
		tc_bwlist.add(bw.getSejue());
		tc_bwlist.add(bw.getSl_y());
		tc_bwlist.add(bw.getSl_z());
		tc_bwlist.add(bw.getYd_xz_z());
		tc_bwlist.add(bw.getYd_xz_y());
		tc_bwlist.add(bw.getYd_xz_sc_y());
		tc_bwlist.add(bw.getYd_xz_sc_n());
		tc_bwlist.add(bw.getYd_sz());
		tc_bwlist.add(bw.getYd_qlx());
		tc_bwlist.add(bw.getYd_jz());
		tc_bwlist.add(bw.getYd_gn());
		tc_bwlist.add(bw.getYd_gm_qt());
		tc_bwlist.add(bw.getYd_gm_ct());
		tc_bwlist.add(bw.getYd_gm_bk());
		tc_bwlist.add(bw.getYan());
		tc_bwlist.add(bw.getXz_zy());
		tc_bwlist.add(bw.getXz_xlv());
		tc_bwlist.add(bw.getXz_xl());
		tc_bwlist.add(bw.getXb_xk());
		tc_bwlist.add(bw.getXb_ly());
		tc_bwlist.add(bw.getXb_hxy());
		

		ArrayList gnlist = new ArrayList();
		String gnsql = "insert into jiancha_gn (uid,alb,alt,aptt,ast,bt,bun,cho,dbil,gdBc,HbsAb,HbsAg,ldl_c,others,pc,pt,qlxBc,scr" +
				",ssBc,tbil,tg,ua,xbXx,xdt) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
		jc_gnForm gn = qf.getGn();
		gnlist.add(uid);
		gnlist.add(gn.getAlb());
		gnlist.add(gn.getAlt());
		gnlist.add(gn.getAptt());
		gnlist.add(gn.getAst());
		gnlist.add(gn.getBt());
		gnlist.add(gn.getBun());
		gnlist.add(gn.getCho());
		gnlist.add(gn.getDbil());
		gnlist.add(gn.getGdBc());
		gnlist.add(gn.getHBsAb());
		gnlist.add(gn.getHBsAg());
		gnlist.add(gn.getLdl_c());
		gnlist.add(gn.getOthers());
		gnlist.add(gn.getPc());
		gnlist.add(gn.getPt());
		gnlist.add(gn.getQlxBc());
		gnlist.add(gn.getScr());
		gnlist.add(gn.getSsBc());
		gnlist.add(gn.getTbil());
		gnlist.add(gn.getTg());
		gnlist.add(gn.getUa());
		gnlist.add(gn.getXbXx());
		gnlist.add(gn.getXdt());
		ArrayList xclist = new ArrayList();
		String xcsql = "insert into jiancha_xcwt (uid,bnz,cccu,copd,dmbs,dny,dsz,dznqx,fjh,flxsgy,fy,gy,gzdmcj,gzxz,hbbbx," +
				"hxothers,jcdml,jmy,jxsy,kyxjcy,mlxtjs,mxsy,mxwy,ncx,nxgothers,qgbz,qgy,qtjb,sejcky,sgnsj,sjxtjb,swmdmyh,szothers,tnbsb," +
				"xgothers,xhxtothers,xjgs,xjt,xlsj,xqqtt,xxgothers,ybothers,zfy,zqgxc,zqgy,zwmcx) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
		jc_xcForm xc = qf.getXc();
		xclist.add(uid);
		xclist.add(xc.getBnz());
		xclist.add(xc.getCccu());
		xclist.add(xc.getCopd());
		xclist.add(xc.getDmbs());
		xclist.add(xc.getDny());
		xclist.add(xc.getDsz());
		xclist.add(xc.getDznqx());
		xclist.add(xc.getFjh());
		xclist.add(xc.getFlxsgy());
		xclist.add(xc.getFy());
		xclist.add(xc.getGy());
		xclist.add(xc.getGzdmcj());
		xclist.add(xc.getGzxz());
		xclist.add(xc.getHbbbx());
		xclist.add(xc.getHxothers());
		xclist.add(xc.getJcdml());
		xclist.add(xc.getJmy());
		xclist.add(xc.getJxsy());
		xclist.add(xc.getKyxjcy());
		xclist.add(xc.getMlxtjs());
		xclist.add(xc.getMxsy());
		xclist.add(xc.getMxwy());
		xclist.add(xc.getNcx());
		xclist.add(xc.getNxgothers());
		xclist.add(xc.getQgbz());
		xclist.add(xc.getQgy());
		xclist.add(xc.getQtjb());
		xclist.add(xc.getSejcky());
		xclist.add(xc.getSgnsj());
		xclist.add(xc.getSjxtjb());
		xclist.add(xc.getSwmdmyh());
		xclist.add(xc.getSzothers());
		xclist.add(xc.getTnbsb());
		xclist.add(xc.getXgothers());
		xclist.add(xc.getXhxtothers());
		xclist.add(xc.getXjgs());
		xclist.add(xc.getXjt());
		xclist.add(xc.getXlsj());
		xclist.add(xc.getXqqtt());
		xclist.add(xc.getXxgothers());
		xclist.add(xc.getYbothers());
		xclist.add(xc.getZfy());
		xclist.add(xc.getZqgxc());
		xclist.add(xc.getZqgy());
		xclist.add(xc.getZwmcx());
		ArrayList zylist = new ArrayList();
		String zysql = "insert into jiancha_zy (uid,bam,dtime,dyuanyin,fymingcheng,fyqjy,jigoumc,kqym,lgym,slym,ymothers,yyyc) values (?,?,?,?,?,?,?,?,?,?,?,?)";
		jc_zyForm zy = qf.getZy();
		zylist.add(uid);
		zylist.add(zy.getBam());
		zylist.add(zy.getDtime());
		zylist.add(zy.getDyuanyin());
		zylist.add(zy.getFymingcheng());
		zylist.add(zy.getFyqjy());
		zylist.add(zy.getJigoumc());
		zylist.add(zy.getKqym());
		zylist.add(zy.getLgym());
		zylist.add(zy.getSlym());
		zylist.add(zy.getYmothers());
		zylist.add(zy.getYyyc());
		ArrayList zzlist = new ArrayList();
		String zzsql = "insert into jiancha_zz (uid,bxm,copd,COPDhxkn,COPDjjm,COPDkc,COPDks,COPDkt,COPDxny,fevi" +
				",ggnfevi,sgrq,thxhdb,xshK,xybhd,zbdm) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
		jc_zzForm zz = qf.getZz();
		zzlist.add(uid);
		zzlist.add(zz.getBxm());
		zzlist.add(zz.getCopd());
		zzlist.add(zz.getCOPDhxkn());
		zzlist.add(zz.getCOPDjjm());
		zzlist.add(zz.getCOPDkc());
		zzlist.add(zz.getCOPDks());
		zzlist.add(zz.getCOPDkt());
		zzlist.add(zz.getCOPDxny());
		zzlist.add(zz.getFevi());
		zzlist.add(zz.getGgnfevi());
		zzlist.add(zz.getSgrq());
		zzlist.add(zz.getThxhdb());
		zzlist.add(zz.getXshK());
		zzlist.add(zz.getXybhd());
		zzlist.add(zz.getZbdm());
		int tc_i = db.executeUpdate(tc_jbsql, tc_jblist);
		int sysjc_i = db.executeUpdate(tc_sysjcsql, tc_sysjclist);
		int bw_i = db.executeUpdate(tc_bwsql, tc_bwlist);
		int gn_i = db.executeUpdate(gnsql, gnlist);
		int xc_i = db.executeUpdate(xcsql, xclist);
		int zy_i = db.executeUpdate(zysql, zylist);
		int zz_i = db.executeUpdate(zzsql, zzlist);
		if(tc_i == 0 || sysjc_i == 0 ||bw_i == 0||gn_i==0||xc_i==0||zy_i==0||zz_i==0){
			ok = false;
		}else{
			ok = true;
		}
		return ok;
		
	}
	/**
	 * 查询方法
	 * @param uid ----->用户ID
	 * @return QtichaForm
	 */
	public QtichaForm sel(int uid){
		QtichaForm qf = new QtichaForm();
		List list = new ArrayList();
		list.add("jiancha_gn");
		list.add("jiancha_xcwt");
		list.add("jiancha_zy");
		list.add("jiancha_zz");
		list.add("tc_bw");
		list.add("tc_jb");
		list.add("tc_sysjc");
		for (int i = 0; i < list.size(); i++) {
			String sql = "select * from " + list.get(i) + " where uid = ?";
			ArrayList sellist = new ArrayList();
			sellist.add(uid);
			ResultSet rs = db.executeQuery(sql, sellist);
			if(rs != null){
			try {
			if(list.get(i).equals("jiancha_gn")){
				jc_gnForm gn = new jc_gnForm();
					while(rs.next()){
						gn.setAlb(rs.getString("alb"));
						gn.setAlt(rs.getString("alt"));
						gn.setAptt(rs.getString("aptt"));
						gn.setAst(rs.getString("ast"));
						gn.setBt(rs.getString("bt"));
						gn.setBun(rs.getString("bun"));
						gn.setCho(rs.getString("cho"));
						gn.setDbil(rs.getString("dbil"));
						gn.setGdBc(rs.getString("gdBc"));
						gn.setHBsAb(rs.getString("HbsAb"));
						gn.setHBsAg(rs.getString("HbsAg"));
						gn.setLdl_c(rs.getString("ldl_c"));
						gn.setOthers(rs.getString("others"));
						gn.setPc(rs.getString("pc"));
						gn.setPt(rs.getString("pt"));
						gn.setQlxBc(rs.getString("qlxBc"));
						gn.setScr(rs.getString("scr"));
						gn.setSsBc(rs.getString("ssBc"));
						gn.setTbil(rs.getString("tbil"));
						gn.setTg(rs.getString("tg"));
						gn.setUa(rs.getString("ua"));
						gn.setUid(uid);
						gn.setXbXx(rs.getString("xbXx"));
						gn.setXdt(rs.getString("xdt"));
					}
					qf.setGn(gn);
			}else if(list.get(i).equals("jiancha_xcwt")){
				jc_xcForm xc = new jc_xcForm();
					while(rs.next()){
						xc.setBnz(rs.getString("bnz"));
						xc.setCccu(rs.getString("cccu"));
						xc.setCopd(rs.getString("copd"));
						xc.setDmbs(rs.getString("dmbs"));
						xc.setDny(rs.getString("dny"));
						xc.setDsz(rs.getString("dsz"));
						xc.setDznqx(rs.getString("dznqx"));
						xc.setFjh(rs.getString("fjh"));
						xc.setFlxsgy(rs.getString("flxsgy"));
						xc.setFy(rs.getString("fy"));
						xc.setGy(rs.getString("gy"));
						xc.setGzdmcj(rs.getString("gzdmcj"));
						xc.setGzxz(rs.getString("gzxz"));
						xc.setHbbbx(rs.getString("hbbbx"));
						xc.setHxothers(rs.getString("hxothers"));
						xc.setJcdml(rs.getString("jcdml"));
						xc.setJmy(rs.getString("jmy"));
						xc.setJxsy(rs.getString("jxsy"));
						xc.setKyxjcy(rs.getString("kyxjcy"));
						xc.setMlxtjs(rs.getString("mlxtjs"));
						xc.setMxsy(rs.getString("mxsy"));
						xc.setMxwy(rs.getString("mxwy"));
						xc.setNcx(rs.getString("ncx"));
						xc.setNxgothers(rs.getString("nxgothers"));
						xc.setQgbz(rs.getString("qgbz"));
						xc.setQgy(rs.getString("qgy"));
						xc.setQtjb(rs.getString("qtjb"));
						xc.setSejcky(rs.getString("sejcky"));
						xc.setSgnsj(rs.getString("sgnsj"));
						xc.setSjxtjb(rs.getString("sjxtjb"));
						xc.setSwmdmyh(rs.getString("swmdmyh"));
						xc.setSzothers(rs.getString("szothers"));
						xc.setTnbsb(rs.getString("tnbsb"));
						xc.setUid(uid);
						xc.setXgothers(rs.getString("xgothers"));
						xc.setXhxtothers(rs.getString("xhxtothers"));
						xc.setXjgs(rs.getString("xjgs"));
						xc.setXjt(rs.getString("xjt"));
						xc.setXlsj(rs.getString("xlsj"));
						xc.setXqqtt(rs.getString("xqqtt"));
						xc.setXxgothers(rs.getString("xxgothers"));
						xc.setYbothers(rs.getString("ybothers"));
						xc.setZfy(rs.getString("zfy"));
						xc.setZqgxc(rs.getString("zqgxc"));
						xc.setZqgy(rs.getString("zqgy"));
						xc.setZwmcx(rs.getString("zwmcx"));
					}
					qf.setXc(xc);
			}else if(list.get(i).equals("jiancha_zy")){
				jc_zyForm zy = new jc_zyForm();
					while(rs.next()){
						zy.setBam(rs.getString("bam"));
						zy.setDtime(rs.getString("dtime"));
						zy.setDyuanyin(rs.getString("dyuanyin"));
						zy.setFymingcheng(rs.getString("fymingcheng"));
						zy.setFyqjy(rs.getString("fyqjy"));
						zy.setJigoumc(rs.getString("jigoumc"));
						zy.setKqym(rs.getString("kqym"));
						zy.setLgym(rs.getString("lgym"));
						zy.setSlym(rs.getString("slym"));
						zy.setUid(uid);
						zy.setYmothers(rs.getString("ymothers"));
						zy.setYyyc(rs.getString("yyyc"));
					}
					qf.setZy(zy);
			}else if(list.get(i).equals("jiancha_zz")){
				jc_zzForm zz = new jc_zzForm();
					while(rs.next()){
						zz.setBxm(rs.getString("bxm"));
						zz.setCopd(rs.getString("copd"));
						zz.setCOPDhxkn(rs.getString("COPDhxkn"));
						zz.setCOPDjjm(rs.getString("COPDjjm"));
						zz.setCOPDkc(rs.getString("COPDkc"));
						zz.setCOPDks(rs.getString("COPDks"));
						zz.setCOPDkt(rs.getString("COPDkt"));
						zz.setCOPDxny(rs.getString("COPDxny"));
						zz.setFevi(rs.getString("fevi"));
						zz.setGgnfevi(rs.getString("ggnfevi"));
						zz.setSgrq(rs.getString("sgrq"));
						zz.setThxhdb(rs.getString("thxhdb"));
						zz.setXshK(rs.getString("xshK"));
						zz.setXybhd(rs.getString("xybhd"));
						zz.setZbdm(rs.getString("zbdm"));
						zz.setUid(uid);
					}
					qf.setZz(zz);
			}else if(list.get(i).equals("tc_bw")){
				Ticha_bw bw = new Ticha_bw();
					while(rs.next()){
						bw.setBi_bd(rs.getString("bi_bd"));
						bw.setBi_jg(rs.getString("bi_jg"));
						bw.setBi_xj(rs.getString("bi_xj"));
						bw.setEr_tl(rs.getString("er_tl"));
						bw.setEr_we(rs.getString("er_we"));
						bw.setFb_cz(rs.getString("fb_cz"));
						bw.setFb_gz(rs.getString("fb_gz"));
						bw.setFb_kz_ss(rs.getString("fb_kz_ss"));
						bw.setFb_kz_yd(rs.getString("fb_kz_yd"));
						bw.setFb_pz(rs.getString("fb_pz"));
						bw.setFb_sz(rs.getString("fb_sz"));
						bw.setFb_tz(rs.getString("fb_tz"));
						bw.setFk_fj(rs.getString("fk_fj"));
						bw.setFk_gj(rs.getString("fk_gj"));
						bw.setFk_qt(rs.getString("fk_qt"));
						bw.setFk_wy(rs.getString("fk_wy"));
						bw.setFk_yd(rs.getString("fk_yd"));
						bw.setFk_yj(rs.getString("fk_yj"));
						bw.setFk_zg(rs.getString("fk_zg"));
						bw.setJzsl_y(rs.getString("jzsl_y"));
						bw.setJzsl_z(rs.getString("jzsl_z"));
						bw.setKq_cun(rs.getString("kq_cun"));
						bw.setKq_nm(rs.getString("kq_nm"));
						bw.setKq_qt(rs.getString("kq_qt"));
						bw.setKq_yc(rs.getString("kq_yc"));
						bw.setKq_yy(rs.getString("kq_yy"));
						bw.setPh_gm(rs.getString("ph_gm"));
						bw.setPh_jzx(rs.getString("ph_jzx"));
						bw.setPh_lbj(rs.getString("ph_lbj"));
						bw.setPh_rf(rs.getString("ph_rf"));
						bw.setQt_syc(rs.getString("qt_syc"));
						bw.setQt_yc(rs.getString("qt_yc"));
						bw.setSejue(rs.getString("sejue"));
						bw.setSl_y(rs.getString("sl_y"));
						bw.setSl_z(rs.getString("sl_z"));
						bw.setUid(uid);
						bw.setYd_xz_z(rs.getString("yd_xz_z"));
						bw.setYd_xz_y(rs.getString("yd_xz_y"));
						bw.setYd_xz_sc_y(rs.getString("yd_xz_sc_y"));
						bw.setYd_xz_sc_n(rs.getString("yd_xz_sc_n"));
						bw.setYd_sz(rs.getString("yd_sz"));
						bw.setYd_qlx(rs.getString("yd_qlx"));
						bw.setYd_jz(rs.getString("yd_jz"));
						bw.setYd_gn(rs.getString("yd_gn"));
						bw.setYd_gm_qt(rs.getString("yd_gm_qt"));
						bw.setYd_gm_ct(rs.getString("yd_gm_ct"));
						bw.setYd_gm_bk(rs.getString("yd_gm_bk"));
						bw.setYan(rs.getString("yan"));
						bw.setXz_zy(rs.getString("xz_zy"));
						bw.setXz_xlv(rs.getString("xz_xlv"));
						bw.setXz_xl(rs.getString("xz_xl"));
						bw.setXb_xk(rs.getString("xb_xk"));
						bw.setXb_ly(rs.getString("xb_ly"));
						bw.setXb_hxy(rs.getString("xb_hxy"));
					}
					qf.setBw(bw);
			}else if(list.get(i).equals("tc_jb")){
				Tichajb jb = new Tichajb();
					while(rs.next()){
						jb.setTcBMI(rs.getString("tcBMI"));
						jb.setTchuxi(rs.getString("tchuxi"));
						jb.setTcmaibo(rs.getString("tcmaibo"));
						jb.setTcqinggan(rs.getString("tcqinggan"));
						jb.setTcrenzi(rs.getString("tcrenzi"));
						jb.setTcshengao(rs.getString("tcshengao"));
						jb.setTcshenghuo(rs.getString("tcshenghuo"));
						jb.setTctime(rs.getString("tctime"));
						jb.setTctiwen(rs.getString("tctiwen"));
						jb.setTctizhong(rs.getString("tctizhong"));
						jb.setUid(uid);
						jb.setTczhusu(rs.getString("tczhusu"));
						jb.setTcyiyuan(rs.getString("tcyiyuan"));
						jb.setTcyisheng(rs.getString("tcyisheng"));
						jb.setTcxueya_z(rs.getString("tcxueya_z"));
						jb.setTcyaowei(rs.getString("tcyaowei"));
						jb.setTcxueya_y(rs.getString("tcxueya_y"));
					}
					qf.setJb(jb);
			}else if(list.get(i).equals("tc_sysjc")){
				Tichasysjc sysjc = new Tichasysjc();
					while(rs.next()){
						sysjc.setFcg_cl(rs.getString("fcg_cl"));
						sysjc.setFcg_fcg(rs.getString("fcg_fcg"));
						sysjc.setFcg_yxsy_yang(rs.getString("fcg_yxsy_yang"));
						sysjc.setFcg_yxsy_ying(rs.getString("fcg_yxsy_ying"));
						sysjc.setNcg_bz(rs.getString("ncg_bz"));
						sysjc.setNcg_ndb(rs.getString("ncg_ndb"));
						sysjc.setNcg_nt_ndhs(rs.getString("ncg_nt_ndhs"));
						sysjc.setNcg_nt_ndy(rs.getString("ncg_nt_ndy"));
						sysjc.setNcg_nt_tt(rs.getString("ncg_nt_tt"));
						sysjc.setNcg_PH(rs.getString("ncg_PH"));
						sysjc.setNcg_qt(rs.getString("ncg_qt"));
						sysjc.setNcg_wg(rs.getString("ncg_wg"));
						sysjc.setNcg_xb_gx(rs.getString("ncg_xb_gx"));
						sysjc.setNcg_xb_jjt(rs.getString("ncg_xb_jjt"));
						sysjc.setNcg_xb_RBC(rs.getString("ncg_xb_RBC"));
						sysjc.setNcg_xb_spxb(rs.getString("ncg_xb_spxb"));
						sysjc.setNcg_xb_WBC(rs.getString("ncg_xb_WBC"));
						sysjc.setXt_ds(rs.getString("xt_ds"));
						sysjc.setXt_zt(rs.getString("xt_zt"));
						sysjc.setUid(uid);
						sysjc.setXcg_HB(rs.getString("xcg_HB"));
						sysjc.setXcg_WBC(rs.getString("xcg_WBC"));
						sysjc.setXcg_RBC(rs.getString("xcg_RBC"));
						sysjc.setXcg_PLT(rs.getString("xcg_PLT"));
					}
					qf.setSysjc(sysjc);
			}
			} catch (SQLException e) {
				e.printStackTrace();
			}
			}
		}
		return qf;
	}
	/**
	 * 更新方法
	 * @param qf --》QtichaForm
	 * @return boolean
	 */
	public boolean update(QtichaForm qf){
		boolean ok = false;
		int uid = qf.getUid();
		this.del(uid);
		ok = this.add(qf);
		return ok;
	}
	
}
